home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DO1002.ARJ
/
EDIT.SCR
< prev
next >
Wrap
Text File
|
1991-12-29
|
4KB
|
132 lines
.pg -24
/GOSUB EditHeader
Allows the user to activate »%t«DO»#«'s built in »ye«full-screen editor»#«
or a specified external editor to create/modify the file
of their choice.
The »%t«/EDIT»#« command uses »%t«DO»#«'s built in editor by default. By setting
the reserved variable »ye«EDIT»#« to the name of your favorite editor, »%t«DO»#«
will use that editor instead. For example:
/SET EDIT TPE
/EDIT MYFILE.TXT
/SET EDIT ""
Would set »gr«TPE»#« as the editor, edit the file MYFILE.TXT with it and
then reset the editor to the default »%t«DO»#« Internal Editor.
»%t«DO»#«'s internal full-screen editor is capable of editing text files
up to »ma«65,000 bytes long»#« in the available memory on your computer.
It contains a full range of commands patterned after WordStar (tm).
.pg wi full clr ye
THE /EDIT SCREEN
»#«
The top line of the editing screen is always a status line.
The status line looks like this:
»cy«
^P Line {number} Col {number} Insert Indent Tab {drive}:{Filename}
»#«
It provides the following information:
.pg go 1 6
»bo«^P»cy« Line {number} Col {number} Insert Indent Tab {drive}:{Filename}
.wi 1 10 79 20 clr ye
Command Echo
»#«
When the first key of a command assigned to two
keystrokes is pressed, or when the Insert control
character command ("»bo«<Ctrl-P>»#«") is given, the keystroke
is echoed at the left edge of the status line.
.pg wi full go 1 6 cy
^P »bo«Line {number}»cy« Col {number} Insert Indent Tab {drive}:{Filename}
.wi 1 10 79 20 clr ye
Line {number}
»#«
Shows the number of the line containing the cursor,
counted from the start of the file.
.pg wi full go 1 6 cy
^P Line {number} »bo«Col {number}»cy« Insert Indent Tab {drive}:{Filename}
.wi 1 10 79 20 clr ye
Col {number}
»#«
Shows the column number containing the cursor.
.pg wi full go 1 6 cy
^P Line {number} Col {number} »bo«Insert»cy« Indent Tab {drive}:{Filename}
»#«
.wi 1 10 79 20 clr ye
Insert
»#«
Indicates that Insert mode is in effect.
.pg wi full go 1 6 cy
^P Line {number} Col {number} Insert »bo«Indent»cy« Tab {drive}:{Filename}
»#«
.wi 1 10 79 20 clr ye
Indent
»#«
Indicates that Autoindent mode is in effect. »bo«<Ctrl-Q> I»#«
toggles autoindent on and off.
.pg wi full go 1 6 cy
^P Line {number} Col {number} Insert Indent »bo«Tab»cy« {drive}:{Filename}
»#«
.wi 1 10 79 20 clr ye
Tab
»#«
Indicates that fixed tabs are in effect.
.pg wi full go 1 6 cy
^P Line {number} Col {number} Insert Indent Tab »bo«{drive}:{Filename}»#«
.wi 1 10 79 20 clr ye
{drive}:{filename}
»#«
The drive, name, and extension of the file being
edited. Although the »%t«/EDIT»#« command accepts path
designations, the path name will not be displayed on
the status line.
* Redisplay the edit header
.pg
/GOSUB EditHeader
The Editor has an extensive set of commands. It can edit files up
»ma«65,000 characters long»#« (depending on your memory). The commands
for the editor are contained in the file »ye«EDITOR.CMD»#«. You can
print this file on your printer.
Let's create a file for you to edit. We'll copy the »cy«EDITOR.CMD»#« file
to »ye«EDITOR.TMP»#« and you can explore the editor.
Be sure to use the »bo«<Ctrl-K>D»#«, »bo«<F10>»#« or »bo«<Alt-X>»#« keystrokes to exit
the editor when you're through experimenting with the edit commands.
(»cy«By the way, we'll use the "»ye«Q»cy«" option of the "»ye«!»cy«" command so you won't
see the copy happen.»#«)
|!Q;COPY EDITOR.CMD EDITOR.TMP
|/EDIT EDITOR.TMP
/GOSUB EditHeader
»ye« Now that you have tried the built-in editor»#«
/GOTOC " Would you like to try »ma«your favorite editor»#« (Y/N)?" YN
:Y
/SET Default ""
/GETS EDIT Default " Editor (Press <enter> to continue without editing:" 40 UC
/IF EDIT NE "" N
/EDIT EDITOR.TMP
/SET EDIT ""
:N
/GOSUB EditHeader
We'll leave »ye«EDITOR.TMP»#« on your disk to use in the
»%t«/ERASE»#« tutorial coming later.
/GOTO EditEnd
:EditHeader
.wi full clr ye
COMMAND NAME»gray«: »%t« EditFile »ye«
/EDIT {filename}
/cw
/RETURN
:EDITEND
/ENDEXEC